/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.tencentcloudapi.trocket.v20230308.models;

import com.tencentcloudapi.common.AbstractModel;
import com.tencentcloudapi.common.SSEResponseModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;

public class DescribeMigratingGroupStatsResponse extends AbstractModel {

    /**
    * Source cluster consumer group accumulation.
    */
    @SerializedName("SourceConsumeLag")
    @Expose
    private Long SourceConsumeLag;

    /**
    * Target cluster consumer group accumulation.
    */
    @SerializedName("TargetConsumeLag")
    @Expose
    private Long TargetConsumeLag;

    /**
    * Source cluster connection client list.
    */
    @SerializedName("SourceConsumerClients")
    @Expose
    private ConsumerClient [] SourceConsumerClients;

    /**
    * Target cluster connection client list.
    */
    @SerializedName("TargetConsumerClients")
    @Expose
    private ConsumerClient [] TargetConsumerClients;

    /**
    * The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
    */
    @SerializedName("RequestId")
    @Expose
    private String RequestId;

    /**
     * Get Source cluster consumer group accumulation. 
     * @return SourceConsumeLag Source cluster consumer group accumulation.
     */
    public Long getSourceConsumeLag() {
        return this.SourceConsumeLag;
    }

    /**
     * Set Source cluster consumer group accumulation.
     * @param SourceConsumeLag Source cluster consumer group accumulation.
     */
    public void setSourceConsumeLag(Long SourceConsumeLag) {
        this.SourceConsumeLag = SourceConsumeLag;
    }

    /**
     * Get Target cluster consumer group accumulation. 
     * @return TargetConsumeLag Target cluster consumer group accumulation.
     */
    public Long getTargetConsumeLag() {
        return this.TargetConsumeLag;
    }

    /**
     * Set Target cluster consumer group accumulation.
     * @param TargetConsumeLag Target cluster consumer group accumulation.
     */
    public void setTargetConsumeLag(Long TargetConsumeLag) {
        this.TargetConsumeLag = TargetConsumeLag;
    }

    /**
     * Get Source cluster connection client list. 
     * @return SourceConsumerClients Source cluster connection client list.
     */
    public ConsumerClient [] getSourceConsumerClients() {
        return this.SourceConsumerClients;
    }

    /**
     * Set Source cluster connection client list.
     * @param SourceConsumerClients Source cluster connection client list.
     */
    public void setSourceConsumerClients(ConsumerClient [] SourceConsumerClients) {
        this.SourceConsumerClients = SourceConsumerClients;
    }

    /**
     * Get Target cluster connection client list. 
     * @return TargetConsumerClients Target cluster connection client list.
     */
    public ConsumerClient [] getTargetConsumerClients() {
        return this.TargetConsumerClients;
    }

    /**
     * Set Target cluster connection client list.
     * @param TargetConsumerClients Target cluster connection client list.
     */
    public void setTargetConsumerClients(ConsumerClient [] TargetConsumerClients) {
        this.TargetConsumerClients = TargetConsumerClients;
    }

    /**
     * Get The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. 
     * @return RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public String getRequestId() {
        return this.RequestId;
    }

    /**
     * Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     * @param RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public void setRequestId(String RequestId) {
        this.RequestId = RequestId;
    }

    public DescribeMigratingGroupStatsResponse() {
    }

    /**
     * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
     *       and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
     */
    public DescribeMigratingGroupStatsResponse(DescribeMigratingGroupStatsResponse source) {
        if (source.SourceConsumeLag != null) {
            this.SourceConsumeLag = new Long(source.SourceConsumeLag);
        }
        if (source.TargetConsumeLag != null) {
            this.TargetConsumeLag = new Long(source.TargetConsumeLag);
        }
        if (source.SourceConsumerClients != null) {
            this.SourceConsumerClients = new ConsumerClient[source.SourceConsumerClients.length];
            for (int i = 0; i < source.SourceConsumerClients.length; i++) {
                this.SourceConsumerClients[i] = new ConsumerClient(source.SourceConsumerClients[i]);
            }
        }
        if (source.TargetConsumerClients != null) {
            this.TargetConsumerClients = new ConsumerClient[source.TargetConsumerClients.length];
            for (int i = 0; i < source.TargetConsumerClients.length; i++) {
                this.TargetConsumerClients[i] = new ConsumerClient(source.TargetConsumerClients[i]);
            }
        }
        if (source.RequestId != null) {
            this.RequestId = new String(source.RequestId);
        }
    }


    /**
     * Internal implementation, normal users should not use it.
     */
    public void toMap(HashMap<String, String> map, String prefix) {
        this.setParamSimple(map, prefix + "SourceConsumeLag", this.SourceConsumeLag);
        this.setParamSimple(map, prefix + "TargetConsumeLag", this.TargetConsumeLag);
        this.setParamArrayObj(map, prefix + "SourceConsumerClients.", this.SourceConsumerClients);
        this.setParamArrayObj(map, prefix + "TargetConsumerClients.", this.TargetConsumerClients);
        this.setParamSimple(map, prefix + "RequestId", this.RequestId);

    }
}

